package cn.leaf.uc.service.controller;

import cn.leaf.uc.api.entity.RoleEntity;
import cn.leaf.uc.api.mapper.RoleMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 *
 * description: 测试
 *
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-11-08 14:57:49
 * slogan: There are no two identical leaves in the world.
 *
 */
@RequestMapping(value = "test")
@RestController
public class TestController {

    @Resource
    private RoleMapper roleMapper;

    @GetMapping
    public String test() {

        // 测试租户过滤
        List<RoleEntity> roleEntities = roleMapper.selectList(new LambdaQueryWrapper<RoleEntity>().eq(RoleEntity::getStatus, 1));
        System.out.println(roleEntities.toString());
        return "hello, I am twinkle leaf.";
    }
}
